﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Texfina.Core.Common;

namespace Texfina.ERP
{
   public partial class Default : System.Web.UI.Page
   {
      protected void Page_Load(object sender, EventArgs e)
      {
         Session[ConstSessionVar.ISADM] = "";

         if (User.Identity.AuthenticationType != ConstAuthenticationType.LDAP && User.Identity.AuthenticationType != ConstAuthenticationType.FORM)
            Response.Redirect("wfChgEmpPer.aspx");
         else
         {
            string strUser = this.Request.ServerVariables["AUTH_USER"].ToString();

            int intIdx = strUser.LastIndexOf("\\");

            if (intIdx > 0)
               Session[ConstSessionVar.USERID] = strUser.Substring(intIdx + 1);
            else
               Session[ConstSessionVar.USERID] = strUser;

            Response.Redirect("wfSelEmpPer.aspx");
         }
      }
   }
}